<template>
  <div class="box">
    <h3>b</h3>
    <h3>{{ num }}</h3>
  </div>
</template>

<script>
export default {
  data () {
    return {
      num: ''
    }
  },
  mounted () {
    this.$bus.$on('atob', num => {
      this.num = num
      console.log(1)
    })
  },
  beforeDestroy () {
    this.$bus.$off('atob')
  }
}
</script>

<style lang="scss" scoped>
.box {
  width: 200px;
  height: 200px;
  border: 5px solid blue;
}
</style>
